Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a storage medium, and, in particular, to an image processing apparatus and an image processing method that reduce the effects of fog, mist, and so forth, on an image taken by shooting, as well as a storage medium.
Description of the Related Art
Conventional monitoring cameras are required to take images with high visibility by shooting in various environments, but when an object is foggy or misty, an image has low contrast and lacks visibility. Thus, Japanese Laid-Open Patent Publication (Kokai) No. 2006-98614 proposes a method in which, based on a luminance histogram of an image, a low-tone part and a high-tone part in a luminance correction curve are computed, and an endpoint of the computed high-tone part on a low-tone side and an endpoint of the computed low-tone part on a high-tone side in the luminance correction curve are connected together to obtain a half-tone part. Luminance levels of the image are corrected across the whole tone range using the computed low-tone part, half-tone part, and high-tone part in the luminance correction curve.
On the other hand, the degree of reduction in the contrast of an image constantly changes, because the densities of fog and mist are not constant, and may vary as time passes. Thus, in a shooting environment that is foggy and misty, it is useful to adaptively change the degree of contrast enhancement according to a luminance histogram of an image taken by shooting and thus, improve visibility of the image.
The technique disclosed in Japanese Laid-Open Patent Publication (Kokai) No. 2006-98614, however, does not deal with changes in a luminance histogram occurring with changes in illuminance of a shooting environment. When illuminance of a shooting environment is low, the peak of a luminance histogram shifts toward a low-luminance side, and there tends to be noise components on a high-luminance side. As a result, the degree of contrast enhancement on the high-luminance side is calculated based on the luminance histogram including the noise components, and hence, contrast may be poorly enhanced on the high-luminance side, making appropriate tone correction impossible.